// Java program for slope of line
 
import java.util.*;
 
class LineSlope {
 
    // function to find the slope of a straight line
    static float slope(float x1, float y1, float x2, float y2) {
        if (x1 == x2)
            return Integer.MAX_VALUE;
        return (y2 - y1) / (x2 - x1);
    }
	
    public static void main(String[] args) {
		// Change the values accodingly
        float x1 = 4, y1 = 2;
        float x2 = 2, y2 = 5;
        System.out.print("Slope is: " + slope(x1, y1, x2, y2));
    }
}